<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>index</title>
<link href="jquery-easyui/themes/bootstrap/easyui.css" rel="stylesheet">
<link href="jquery-easyui/themes/icon.css" rel="stylesheet">
<script src="jquery-easyui/jquery.min.js"></script>
<script src="jquery-easyui/jquery.easyui.min.js"></script>
<script src="jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
</head>
<body onload="index()">
	<script type="text/javascript">
		function index() {
			location.replace('/getSession');
		}
		/* $.ajax({
			url : '/getSession',
			success : function(data) {
				location.replace(data);
			},
			error : function(data) {
				$.messager.alert('警告', '网络错误');
			}
		}); */
		/* $.get('/getSession', function(data, textStatus) {
			if (textStatus == 'success') {
				location.href = data.url;
			} else {
				$.messager.alert('警告', '网络错误');
			}
		}); 

		//ajax完成时回调函数
		$(document).ajaxComplete(function(event, xhr, settings) {
			//从http头信息取出 在filter定义的sessionstatus，判断是否是 timeout
			if (xhr.getResponseHeader("sessionstatus") == "timeout") {
				//从http头信息取出登录的url ＝ loginPath
				if (xhr.getResponseHeader("url")) {
					//alert("会话过期，请重新登陆!");
					//打会到登录页面
					window.location.replace(xhr.getResponseHeader("url"));
				} else {
					$.messager.alert("提示", "请求超时请重新登陆 !");
				}
			}
		}); */
	</script>
</body>
</html>